﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QModels;


[Table("AgvCar")]
public class AgvCar:BaseEntity
{

    /// <summary>
    /// 区域
    /// </summary>
    public string? Region {  get; set; }
    public string? CarNumber {  get; set; }
    public string? Description {  get; set; }
    public string IP { get; set; } 
    public int PlcType { get; set; } 

    /// <summary>
    /// 小车电量
    /// </summary>
    public decimal Electricity {  get; set; }
   
    public CarStatus CarStatus { get; set; }

    /// <summary>
    /// 小车最大电量
    /// </summary>
    public decimal? MaxElectricQty {  get; set; }

    /// <summary>
    /// 最少电量可以启动小车
    /// </summary>
    public decimal? MinAllowEleQty {  get; set; }

    public decimal? BigPigeon {  get; set; }
    public string? SmallPigeon {  set; get; }

		public bool IsAutomatic { get; set; }

		public int TaskHour { get; set; }
		public int TaskMinute { get; set; }

	}
	public class AgvCarUpdateCarElectricLimit
	{
		public string? CarNumber { set; get; }

		public int MaxElectricQty { get; set; }
		public int MinElectricQty { get; set; }

	}
	public enum CarStatus
{
    [Description("无")]
    None=0,
		/// <summary>
		/// 待机中
		/// </summary>
		[Description("待机中")]
    DaiJi=1,
		/// <summary>
		/// 喂料中
		/// </summary>
		[Description("喂料中")]
    WeiLiao=2,
		/// <summary>
		/// 故障中
		/// </summary>
		[Description("故障中")]
		Trouble=4,
    /// <summary>
    /// 充电中
    /// </summary>
    [Description("充电中")]
		Charging=8,
	}


public class AgvCarUpdateChongDianTask
{
	public string? CarNumber { set; get; }
}